<%@ page import="bbs.mvc.Beans.Posting" %>
<%@ page import="bbs.mvc.Beans.DBUtils" %>
<%@ page import="java.sql.SQLException" %><%--
  Created by IntelliJ IDEA.
  User: ASUS
  Date: 2021/12/22
  Time: 14:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    int id = Integer.parseInt(request.getParameter("id"));
    Posting posting= null;
    try {
        posting = DBUtils.getPosting(id);
    } catch (SQLException e) {
        e.printStackTrace();
    }
    String title= posting.getTiltle();
    String author= posting.getAuthor();
    String content= posting.getContent();
    System.out.println(title);
    System.out.println(author);
    System.out.println(content);

%>


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="A layout example that shows off a blog page with a list of posts.">
    <title><%=title%></title>
    <link rel="stylesheet" href="./css/pure-main.css">
    <link rel="stylesheet" href="./css/style.css">
    <link rel="stylesheet" href="./css/grids.css">
</head>
<body>

<div id="layout" class="pure-g">
    <div class="sidebar pure-u-1 pure-u-md-1-4">
        <div class="header">
            <h1 class="brand-title">War Hammer</h1>
            <h2 class="brand-tagline">40,000</h2>
            <nav class="nav">
                <ul class="nav-list">
                    <li class="nav-item">
                        <a class="pure-button" href="Arstartes.jsp">Main</a>
                    </li>
<%--                    <li class="nav-item">--%>
<%--                        <a class="pure-button" href="http://yuilibrary.com">YUI Library</a>--%>
<%--                    </li>--%>
                </ul>
            </nav>
        </div>
    </div>

    <div class="content pure-u-1 pure-u-md-3-4">
        <div>
            <!-- A wrapper for all the blog posts -->
            <div class="posts">
                <h1 class="content-subhead">Loyal</h1>
                <!-- A single blog post -->
                <section class="post">
                    <header class="post-header">
<%--                        <img width="48" height="48" alt="Tilo Mitra&#x27;s avatar" class="post-avatar" src="">--%>
                        <h2 class="post-title"><%=title%></h2>

                        <p class="post-meta">
                           By <a href="#" class="post-author"><%=author%></a> <%--under <a class="post-category post-category-design" href="#">CSS</a> <a class="post-category post-category-pure" href="#">Pure</a>--%>
                        </p>
                    </header>
                    <div class="post-description">
                        <p>
                            <%=content%>
                        </p>
                    </div>
                </section>
            </div>


<%--            <div class="footer">--%>
<%--                <div class="pure-menu pure-menu-horizontal">--%>
<%--                    <ul>--%>
<%--                        <li class="pure-menu-item"><a href="http://purecss.io/" class="pure-menu-link">About</a></li>--%>
<%--                        <li class="pure-menu-item"><a href="http://twitter.com/yuilibrary/" class="pure-menu-link">Twitter</a></li>--%>
<%--                        <li class="pure-menu-item"><a href="http://github.com/pure-css/pure/" class="pure-menu-link">GitHub</a></li>--%>
<%--                    </ul>--%>
<%--                </div>--%>
<%--            </div>--%>
        </div>
    </div>
</div>

</body>
</html>
